package com.cdu.guoxinan.www.smartcom;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.scheduling.annotation.EnableAsync;
import com.cdu.guoxinan.www.smartcom.util.EmailTool;

@EnableAsync
@SpringBootApplication
@MapperScan("com.cdu.guoxinan.www.smartcom.mapper")
public class SmartComApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(SmartComApplication.class, args);

        JavaMailSender mailSender = context.getBean(JavaMailSender.class);
        EmailTool.setMailSender(mailSender);
    }

}
